package com.qihe.reviewj2se;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.junit.Test;

public class TestFile {
	@Test
	public void testFile() {
		File f = new File("D:\\hello.java");
		FileInputStream fis = null;
		try {
			fis = new FileInputStream(f);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		byte[] b = new byte[(int) f.length()];
		try {
			fis.read(b);
		} catch (IOException e) {
			e.printStackTrace();
		}
		System.out.println("HibernateTest.testFile()" + b.length);
	}
}
